import 'package:base/widgets/web_view.dart';
import 'package:flutter/material.dart';
import 'package:base/vm/view_model_state.dart';
import 'package:base/vm/view_model.dart';
import 'package:pipeline/model/bean/home_entity.dart';

///ChangeNotifierProvider.value(value: HomeViewModel()),
class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends ViewModelState<HomePage, HomeViewModel> {
  @override
  Widget build(BuildContext context) {
    super.build(context);
    return Scaffold(
      appBar: AppBar(
        title: Text("ddd"),
      ),
      body: WebView(
        url: 'https://www.baidu.com',
      ),
    );
  }
}

class HomeViewModel extends ViewModel {
  HomeEntity? home; //HomeEntity

  getHome() {
    notifyListeners();
  }
}
